﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="PriceAdjustPlanAdd.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.PriceAdjustPlanAdd"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript">

        function switchSchedule(obj) {
            if (obj.selectedIndex == 0) {
                this.document.getElementById('scheduleDiv').style.display = 'none';
            }
            else {

                this.document.getElementById('scheduleDiv').style.display = 'block';
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="maincon">
        <div id="note">
            采购产品价格调整</div>
        <div id="note2">
        </div>
        <table>
            <tr>
                <th align="right" width="120px">
                    <asp:Label ID="lblGoodsName" runat="server" Text="产品名称："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtGoodsName" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblOutLook" runat="server" Text="规格型号："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtOutLook" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblMaterial" runat="server" Text="材质："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtMaterial" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblUnit" runat="server" Text="单位："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtUnit" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblPackUnit" runat="server" Text="包装单位："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtPackUnit" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblQualityLevel1" runat="server" Text="产品类别："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="lblQualityLevel" runat="server"></asp:Label>
                </td>
            </tr>
                <%--<th align="right">
                    <asp:Label ID="lblSort" runat="server" Text="产品类别："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtSort" runat="server"></asp:Label>
                </td>--%>
            <tr>
                <th align="right">
                    <asp:Label ID="lblCompany_SC" runat="server" Text="生产企业："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtCompany_SC" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblCompany_TB" runat="server" Text="投标企业："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtCompany_TB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <%--<th align="right">
                    <asp:Label ID="lblCompany_SC0" runat="server" Text="产品来源："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtSortSource" runat="server"></asp:Label>
                </td>--%>
                <th align="right">
                    <asp:Label ID="lblProject" runat="server" Text="所属项目："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtProject" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblDateTime" runat="server" Text="添加时间："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtDateTime" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblOrigPrice" runat="server" Text="上次价格："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="lblOldPrice" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblP" runat="server" Text="上次调价时间："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="lblPlanTime" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblProcurePrice" runat="server" Text="采购限价："></asp:Label>
                </th>
                <td align="left">
                    <asp:Label ID="txtProcurePrice" runat="server"></asp:Label>
                </td>
                <th align="right">
                    <asp:Label ID="lblAdjustPrice" runat="server" Text="新价格："></asp:Label>
                </th>
                <td align="left">
                    <asp:TextBox ID="txtAdjustPrice" runat="server"></asp:TextBox>
                    <br />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtAdjustPrice"
                        Display="Dynamic" ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+(\.\d+)?$"></asp:RegularExpressionValidator>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAdjustPrice"
                        ErrorMessage="请输入正确的数字格式！" Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblExecuteWay" runat="server" Text="执行方式："></asp:Label>
                </th>
                <td align="left" colspan="3">
                    <asp:DropDownList ID="ddlExecuteWay" onchange="switchSchedule(this);" runat="server">
                        <asp:ListItem Value="0">立即执行</asp:ListItem>
                        <asp:ListItem Value="1">定时执行</asp:ListItem>
                    </asp:DropDownList>
                    <div id="scheduleDiv" style="display: none">
                        执行时间设置：<asp:TextBox ID="txtExecuteStartTime" runat="server" MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false,minDate:'2009-04-22'})"
                            Width="120px"></asp:TextBox></div>
                </td>
            </tr>
            <tr>
                <th align="right">
                    <asp:Label ID="lblAdjustPriceReason" runat="server" Text="调价原因："></asp:Label>
                </th>
                <td align="left" colspan="3">
                    <asp:TextBox ID="txtAdjustPriceReason" runat="server" Height="53px" TextMode="MultiLine"
                        Width="290px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAdjustPriceReason"
                        ErrorMessage="请输入调价原因！"></asp:RequiredFieldValidator>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="GVAdjustPlanList" runat="server" CssClass="mainlist" AutoGenerateColumns="False">
            <Columns>
                <%--<asp:BoundField DataField="OriginalPrice" HeaderText="调整前价格" />--%>
                <asp:TemplateField HeaderText="调整前价格">
                <ItemTemplate>
                    <asp:Label ID="lblPriceOriginalPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(ProjectID, Eval("OriginalPrice")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
                <%--<asp:BoundField DataField="AdjustPrice" HeaderText="调整后价格" />--%>
                <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblAdjustPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(ProjectID, Eval("AdjustPrice")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
                <asp:BoundField DataField="ExecuteStartTime" HeaderText="执行时间" />
                <asp:BoundField DataField="PlanTime" HeaderText="制定时间" />
                <asp:BoundField DataField="AdjustPriceReason" HeaderText="调价原因" />
                 <asp:TemplateField HeaderText="执行状态">
                <ItemTemplate>
                   <%# Eval("ExecuteState").ToString() == "1" ? "已执行" : "未执行"%>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>
             <asp:TemplateField HeaderText="执行方式">
                <ItemTemplate>
                  <%# Eval("ExecuteWay").ToString() == "0" ? "立即执行" : "定时执行"%>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
            </asp:TemplateField>
                <asp:BoundField DataField="PlanPerson" HeaderText="调价人" />
            </Columns>
        </asp:GridView>
        <div class="page">
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
            </webdiyer:AspNetPager>
        </div>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span> 执行方式选择定时执行时，则添加价格调整计划。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="保存" OnClick="btnAdd_Click" CssClass="btn"
            OperateType="新增" />&nbsp;
            <input type="button" value="返回" onclick="javascript:history.go(-1)" class="btn" />
    </div>
</asp:Content>
